home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / rbbsdocs.zip / RBBSDOCS.APA < prev    next >
Text File  |  1990-11-05  |  14KB  |  277 lines

  1.  
  2.  
  3.  
  4.     APPENDIX A -- RBBS-PC Record Formats                                    A-1
  5.  
  6.  
  7.                                      APPENDICES
  8.     APPENDIX A -- RBBS-PC Record Formats
  9.     ------------------------------------
  10.     This  appendix is intended  to document the  record formats of  some of the
  11.     more significant records used within RBBS-PC.  As such, it is intended more
  12.     as  a "programmers' guide"  for those who  wish to  write RBBS-PC utilities
  13.     rather than as "user documentation."  No record format is  "sacrosanct" and
  14.     any of them may  be changed in future  releases.  However such  changes are
  15.     not  made capriciously  and, when  they are  made, are accompanied  by some
  16.     utility program  that will allow the  old files to be  reformatted into the
  17.     new format.
  18.  
  19.     The MESSAGES file contains the messages that have been left on RBBS-PC.  It
  20.     is  a random access  file with 128-byte  records.  The  first record of the
  21.     MESSAGES  file  acts  as  RBBS-PC's  "checkpoint"  record.     The  records
  22.     immediately following  this first  record are the  RBBS-PC "node"  records.
  23.     Each  "node"  record  represents  the activity/options  associated  with  a
  24.     particular copy of RBBS-PC ("node").   There can be up to thirty-six copies
  25.     of  RBBS-PC running simultaneously, therefore there can be up to thirty-six
  26.     "node" records following the "checkpoint" record.
  27.  
  28.     The MESSAGES file has the following logical format:
  29.  
  30.                +----------------------------------------------+
  31.     Record #1  |  RBBS-PC "checkpoint" record                 |
  32.                +----------------------------------------------+
  33.     Record #2  |  RBBS-PC "node" record for node # 1          |
  34.                |                                              |
  35.                |            up to                             |
  36.                |                                              |
  37.                |  RBBS-PC "node" record for node # 9          |
  38.                |  RBBS-PC "node" record for node # 0          |
  39.                |  RBBS-PC "node" record for node "A"          |
  40.                |                                              |
  41.                |            up to                             |
  42.                |  RBBS-PC "node" record for node "Z"          |
  43.                |                                              |
  44.                +----------------------------------------------+
  45.                |  First Record in Message portion of file     |
  46.                +----------------------------------------------+
  47.                |                                              |
  48.                \  Message records that have been used         \
  49.                \                                              \
  50.                |                                              |
  51.                +----------------------------------------------+
  52.                |  Record available for next message           |
  53.                +----------------------------------------------+
  54.                |  Last record available in MESSAGES file      |
  55.                +----------------------------------------------+
  56.  
  57.     The FIRST RECORD  of the "MESSAGES" file acts as  a "checkpoint" record for
  58.     all the  multiple RBBS-PC's  that may  be  sharing the  MESSAGES and  USERS
  59.     files.  It contains information  critical  to  maintaining the integrity of
  60.     these two files.  The layout of RBBS-PC  Message  File  Record Number 1  is
  61.     as follows:
  62.  
  63.     Position Length           Description
  64.  
  65.       1 -  8     8   Number assigned to the last message entered
  66.  
  67.  
  68.  
  69.     RBBS-PC 17.3A            TECHNICAL REFERENCE MANUAL                     A-2
  70.  
  71.  
  72.       9 - 10     2   Security level required to be auto-added to a conference
  73.      11 - 20    10   Current caller number
  74.      21 - 56    36   --- RESERVED FOR FUTURE USE ----
  75.      57 - 61     5   Count of the number of USER records used
  76.      62 - 67     6   --- RESERVED FOR FUTURE USE ----
  77.      68 - 74     7   Record Number where "messages" portion of the
  78.                            MESSAGES file begins
  79.      75 - 81     7   Record Number of the next available record in the
  80.                            MESSAGES file where the next message may be written
  81.      82 - 88     7   Record Number of the last record in the MESSAGES file
  82.      89 - 95     7   Maximum number of messages allowed in the MESSAGES file
  83.      96 -126    31   --- RESERVED FOR FUTURE USE ----
  84.     127 -128     2   Maximum number of RBBS-PC's sharing this MESSAGES file
  85.  
  86.     As a programming reference, line numbers 1900 and 23000 of the BASIC source
  87.     code  for  RBBS-PC.BAS contains  the  code  for  reading this  "checkpoint"
  88.     record.
  89.  
  90.     Following  the first record of the MESSAGES file  are from one to 36 "node"
  91.     records.   Each "node"  record  contains information   critical    to   the
  92.     running of that copy of RBBS-PC associated with that "node".  The layout of
  93.     each RBBS-PC  "node" record is as follows:
  94.  
  95.     Position Length          Description
  96.  
  97.       1 - 31    31  Name of last person on this copy of RBBS-PC
  98.      32 - 33     2  SysOp available indicator (true or false)
  99.      34 - 35     2  SysOp annoy indicator (true or false)
  100.      36 - 37     2  SysOp is to be on next indicator (true or false)
  101.      38 - 39     2  Line printer available indicator (true or false)
  102.      40 - 41     2  Door's availability indicator (true or false)
  103.      42 - 43     2  Eight bit transmission indicator (true or false)
  104.      44 - 45     2  Caller's baud rate indicator: -1 =   300 bps
  105.                                                   -2 =   450 bps
  106.                                                   -3 =  1200 bps
  107.                                                   -4 =  2400 bps
  108.                                                   -5 =  4800 bps
  109.                                                   -6 =  9600 bps
  110.                                                   -7 = 19200 bps
  111.                                                   -8 = 38400 bps
  112.      46 - 47     2  Upper case only indicator (true or false)
  113.      48 - 51     4  Number of bytes transferred (from external protocols)
  114.        52        1  Batch transfer indicator (not zero = batch)
  115.      53 - 54     2  Graphics indicator (0 = text, 1 = full ASCII, 2 = color)
  116.      55 - 56     2  SysOp indicator (-1 = SysOp)
  117.         57       1  Activity indicator (I=inactive, A=active)
  118.      58 - 59     2  SNOOP on indicator (true or false)
  119.      60 - 64     5  Baud that RBBS-PC talks to the modem at (single precision)
  120.      65 - 67     3  Time user logged onto the system (HH:MM:SS)
  121.      68 - 71     4  --- RESERVED FOR FUTURE USE ---
  122.      72 - 73     2  Private door indicator (true or false)
  123.        74        1  Type of transfer to external program:
  124.                                  0 = none
  125.                                  1 = download a file
  126.                                  2 = upload a file
  127.                                  3 = external registration program
  128.        75        1  First letter of file transfer protocol
  129.        76        1  --- RESERVED FOR FUTURE USE ----
  130.      77 - 78     2  Last date, MM-DD-YY, that RBBS-PC exited to DOS (packed)
  131.  
  132.  
  133.  
  134.     APPENDIX A -- RBBS-PC Record Formats                                    A-3
  135.  
  136.  
  137.      79 - 85     7  --- RESERVED FOR FUTURE USE ----
  138.      86 - 90     5  Last time, HH:MM, that RBBS-PC exited to DOS
  139.      91 - 92     2  Reliable mode indicator (true or false)
  140.      93 - 116   24  Work area that normally contains caller's City and State,
  141.                     but when temporarily exiting RBBS-PC used as:
  142.                     Position Length          Description
  143.                      93 -100     8  Programmable user interface file name
  144.                     101 -102     2  Local user indicator (2 hex 0Ds if local)
  145.                     103 -104     2  Local user mode (true if using COM0)
  146.                     105 -112     8  Name of current "conference" or "sub-board"
  147.                     113 -114     2  Time credits (minutes)
  148.                     115 -116     2  --- UNUSED ----
  149.     117 -118     2  Subsystem index of last subsystem user was in.
  150.     119 -124     6  Month, day, and year, MMDDYY, exited to external protocol
  151.     125 -128     4  Hour and minute, HHMM, exited to external protocol
  152.  
  153.     As  a  programming reference  and  in order  to  see how  these  fields are
  154.     set/used in the  node records, review  the following line numbers  in RBBS-
  155.     PC.BAS  -- 150,  200, 400, 420,  842, and  13555.  In  addition, review the
  156.     following subroutines as well:
  157.  
  158.                   Source Code     Subroutine
  159.                  RBBSSUB2.BAS ---- WhosOn
  160.                  RBBSSUB3.BAS ---- FindFKey
  161.                                    SaveProf
  162.                                    ReadProf
  163.                  RBBSSUB4.BAS ---- TimedOut
  164.  
  165.     A message within the messages file consists of a MESSAGE HEADER followed by
  166.     the text of the message.   The RBBS-PC Message File "message header" record
  167.     layout is as follows:
  168.  
  169.     Position Length        Description
  170.  
  171.         1        1  Contains an "*" for read-only messages, blank otherwise
  172.       2 -  5     4  Message number of this message
  173.       6 - 36    31  The name of the person the message is from
  174.      37 - 58    22  The name of the person to whom the message is sent
  175.      59 - 66     8  Time of day that the message was sent (HH:MM:SS)
  176.      67 - 67     1  ---- RESERVED FOR FUTURE USE ----
  177.      68 - 75     8  Date the message was sent (MM-DD-YY)
  178.      76 -100    25  Subject of the message
  179.     101 -115    15  Password for the message (if any)
  180.     116 -116     1  "Active" message indicator = ASCII 225
  181.                     "Killed" message indicator = ASCII 226
  182.     117 -120     4  Number of 128-byte records for this message --
  183.                         including the "message header" record.
  184.     121 -122     2 Minimum security level to read message
  185.     123 -125     3 Date (packed) the message was last read (MM/DD/YY)
  186.     126 -128     3 Time (packed) the message was last read (HH:MM:SS)
  187.  
  188.     As a  programming reference, review lines 3405, 3460, 3530, and 8076 of the
  189.     BASIC source code  for RBBS-PC.BAS to see how  these fields are set.   Each
  190.     record following  the MESSAGE HEADER  record is  a MESSAGE TEXT  record and
  191.     consists of 128 characters.   Each of these 128-byte message  text" records
  192.     contains the message text.  The end of each line in the message is followed
  193.     by an RBBS-PC "end-of-line" indicator which is equal to an ASCII 227.  This
  194.     allows  RBBS-PC to  "pack"  multiple message  lines  in a  single  128-byte
  195.     record.
  196.  
  197.  
  198.  
  199.     RBBS-PC 17.3A            TECHNICAL REFERENCE MANUAL                     A-4
  200.  
  201.  
  202.     Information  unique to each  person who logs  on is contained  in the USERS
  203.     file (a random file of 128-byte records).  Each records is as follows:
  204.  
  205.     Position Length           Description
  206.       1 - 31    31  Users first and last name (separated by a blank).
  207.      32 - 46    15  Users password for logon.
  208.      47 - 48     2  Users security level (permanent).
  209.      49 - 62    14  Users logon options (see detail breakdown below).
  210.      63 - 86    24  City and state from which the user is calling.
  211.      87 - 89     3  ---- RESERVED FOR FUTURE USE ----
  212.      90 - 93     4  Number of files downloaded today
  213.      94 - 97     4  Number of bytes downloaded today
  214.      98 -101     4  Number of bytes downloaded (ever).
  215.     102 -105     4  Number of bytes uploaded (ever).
  216.     106 -119    14  Date and time the user was last on (MM-DD-YY HH:MM).
  217.     120 -122     3  Date the user last listed a directory.
  218.     123 -124     2  Number of files downloaded (ever).
  219.     125 -126     2  Number of files uploaded (ever).
  220.     127 -128     2  Elapsed time the user was on for day of last access.
  221.  
  222.     Line 9400 of the BASIC  source code for  RBBS- PC.BAS contains the code for
  223.     opening this  file.  The user's logon options, positions 49 through 62, are
  224.     utilized as follows:
  225.  
  226.     Position Length           Description
  227.      49 - 50     2   Number of times the user has logged on
  228.      51 - 52     2   Last message number read by the user
  229.         53       1   Protocol Preference (blank if none, otherwise letter)
  230.         54       1   Graphics Preference (see meaning below)
  231.      55 - 56     2   Margin length for this users messages
  232.      57 - 58      2   Bit Flag -- this  16-bit field is denoted by bit 0  being
  233.     the  least significant  (i.e. right-most  bit) and  bit 15  being the  most
  234.     significant (i.e. left-most  bit).   These "bit flags"  have the  following
  235.     meanings (0=off, 1=on):
  236.  
  237.                    BIT  Definition (what ON means)
  238.                     0   Bell prompts
  239.                     1   "Expert" mode
  240.                     2   Nulls
  241.                     3   Upper case only
  242.                     4   Line feeds
  243.                     5   Skip old bulletins
  244.                     6   Check new files on logon
  245.                     7   Use autodownload
  246.                     8   Required questionnaire answered
  247.                     9   Mail Waiting
  248.                    10   Highlighting enabled
  249.                    11   "TurboKey" enabled
  250.                  12-15  RESERVED FOR FUTURE USE
  251.  
  252.      59 - 60     2   Date subscription began
  253.         61       1   Page length to use for this users terminal
  254.         62       1  ------- RESERVED FOR FUTURE USE ---------
  255.                 ---
  256.                 14
  257.  
  258.     The meaning of the graphics preference byte depends on the numeric value it
  259.     has.   The caller can specify, for text files, no graphics, ascii graphics,
  260.     or ansi color graphics;  then  the color, and then whether normal or  bold.
  261.  
  262.  
  263.  
  264.     APPENDIX A -- RBBS-PC Record Formats                                    A-5
  265.  
  266.  
  267.     For example, if graphics preference for text files is color, and preference
  268.     for normal text is light yellow, graphics preference stored is  38.  Colors
  269.     are Red, Green, Yellow, Blue, Purple, Cyan, and White.
  270.  
  271.                              normal                  bold
  272.        graphics\color  R  G  Y  B  P  C  W    R  G  Y  B  P  C  W
  273.         none ......   30 33 36 39 42 45 48 | 51 54 57 60 63 66 69
  274.        ascii ......   31 34 37 40 43 46 49 | 52 55 58 61 64 67 70
  275.         ansi ......   32 35 38 41 44 47 50 | 53 56 59 62 65 68 71
  276.  
  277.